#define  _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int cifang(int x,int y)
{
	if (y == 1)
	{
		return x;
	}
	else if (y == 0)
	{
		return 1;
	}
	else
		y--;
		return x * cifang(x, y);
 }

int main()
{
	int n = 0;
	int ret = 0;
	int k = 0;
	scanf("%d %d", &n,&k);
	ret = cifang(n, k);
	printf("%d\n", ret);
   	return 0;
}